<?php
defined('PT_ACCESS') or die('No direct access');

class news extends ActionController{

	public $model;

	public function __construct(){
		global $registry;
		$this->model = new newsModel($registry);

		$this->viewData = array(
				'pageTitle'=>'Trang tin tuc',
				'pageFooter'=>'Copyright &copy; PTcms - All rights reserved.'
		);
	}

	public function __destruct(){
		unset($this->viewData);
	}

	public function indexAction(){
		$this->viewData = array(
				'pageContent'=>$this->model->listNews(),
				'pageTitle'=>'Test page',
				'pageFooter'=>'Copyright &copy; PTcms - All rights reserved.'
		);
	}

	public function viewAction(){
		$this->viewData = array(
				'pageTitle'=>'Chi tiet tin tuc',
				'pageFooter'=>'Copyright &copy; PTcms - All rights reserved.'
		);
	}
	public function listAction(){

	}
}
